<div id="sidebar">
<div id="">
    <h2><?php __('Actions'); ?></h2>
       <div class="actions">
	<ul>
		<li><?php echo $this->Html->link(__('Your Events', true), array('controller' => 'events', 'action' => 'index')); ?> </li>

                <li><?php echo $this->Html->link(__('Edit my profile', true)
                        , array('action' => 'edit', $host['id'])
                        ); ?></li>

	</ul>
        </div>
</div>
</div>

<div class="hosts form">
<?php 
    echo($javascript->link("preview_image.js"));
    echo $this->Form->create('Host',array('enctype' => 'multipart/form-data'));
?>
	<fieldset>
 		<legend><?php __('Edit Host'); ?></legend>
	<?php
		echo $this->Form->input('business_name',array( 'label' => 'Business name'));
		echo $this->Form->input('first_name',array( 'label' => 'First name'));
		echo $this->Form->input('last_name',array( 'label' => 'Last name'));
		echo $this->Form->input('email_addr',array( 'label' => 'Email adress'));

                echo $this->Form->input('image',array('type'=>'file','id'=>'picField','onchange'=>'preview(this)','label'=>'New profile image'));
                echo '<center>';

                if(file_exists('img/profile/host/'.$host['id'].'.jpg')){
                    echo $this->Html->image('profile/host/'.$host['id'].'.jpg', array('alt' => 'Preview','id'=>'previewField'));
                }else{
                    echo $this->Html->image('default_host.jpg', array('alt' => 'Preview','id'=>'previewField'));
                }

                echo '<br/><br/>';
                echo '</center>';

                //echo '<p>Leave blank if you do not want to change your password</p>';
                echo $this->Form->input('old_password', array('type' => 'password','label'=>'Old password'));
                echo $this->Form->input('new_password', array('type' => 'password','label'=>'New password'));
		//echo $this->Form->input('passwd');
		echo $this->Form->input('phone',array( 'label' => 'Phone number'));
	?>
	</fieldset>
<?php echo $this->Form->end(__('Submit', true));?>
</div>
